package com.quyunshuo.module.home.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.quyunshuo.module.home.fragment.home.HomeFragment
import com.quyunshuo.module.home.fragment.me.MeFragment
import com.quyunshuo.module.home.fragment.target.TodoListFragment

class ViewPagerAdapter(fa: FragmentActivity) : FragmentStateAdapter(fa) {
    
    // 定义页面内容（可以是任意内容）
    private val fragments = listOf(
        HomeFragment(),
        TodoListFragment(),
        MeFragment(),
        MeFragment(),
    )

    override fun getItemCount(): Int = fragments.size

    override fun createFragment(position: Int): Fragment = fragments[position]
}
